﻿<Page x:Class="CentroVentas.Forms.Compras.FrmConfirmarCompra"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:extoolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit.Extended"
      mc:Ignorable="d"
      d:DesignHeight="768"
      d:DesignWidth="1024"
      Title="FrmConfirmarCompra">
    <extoolkit:BusyIndicator IsBusy="False"
                             Name="Busy"
                             BusyContent="Cargando...">
        <ScrollViewer>
            <StackPanel Orientation="Vertical"
                        Height="Auto">
                <Grid>
                    <!-- TITULO -->
                    <TextBlock Text="Confirmar compra"
                               FontSize="24"
                               Margin="0,10,20,0"
                               HorizontalAlignment="Right"
                               Height="Auto" />
                </Grid>
                <GroupBox>
                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="Codigo de compra:"
                                   HorizontalAlignment="Left"
                                   Margin="15,15,0,0" />
                        <TextBox Name="txtCod"
                                 Width="230"
                                 MaxLength="50"
                                 HorizontalAlignment="Left"
                                 Margin="15,5,0,15"
                                 KeyDown="txtCod_KeyDown" />
                        <Button Name="btnConfirmar"
                                Click="btnConfirmar_Click"
                                Content="Confirmar compra" />
                    </StackPanel>
                </GroupBox>
                <GroupBox Header="Detalle compra"
                          Margin="25">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="150" />
                            <ColumnDefinition />
                            <ColumnDefinition Width="150" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <!--FILA 1-->
                        <StackPanel Grid.Column="0"
                                    Grid.Row="0">
                            <TextBlock Text="Orden de compra: " />
                        </StackPanel>
                        <StackPanel Grid.Column="1"
                                    Grid.Row="0">
                            <TextBox Name="txtOrden"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <StackPanel Grid.Column="2"
                                    Grid.Row="0">
                            <TextBlock Text="Estado: " />
                        </StackPanel>
                        <StackPanel Grid.Column="3"
                                    Grid.Row="0">
                            <TextBox Name="txtEstado"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <!--FILA 2-->
                        <StackPanel Grid.Column="0"
                                    Grid.Row="1">
                            <TextBlock Text="Fecha orden: " />
                        </StackPanel>
                        <StackPanel Grid.Column="1"
                                    Grid.Row="1">
                            <TextBox Name="txtFechaOrden"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <StackPanel Grid.Column="2"
                                    Grid.Row="1">
                            <TextBlock Text="Usuario: " />
                        </StackPanel>
                        <StackPanel Grid.Column="3"
                                    Grid.Row="1">
                            <TextBox Name="txtUsuario"
                                     IsReadOnly="True"/>
                        </StackPanel>
                        <!--Fila 3-->
                        <StackPanel Grid.Column="0"
                                    Grid.Row="2">
                            <TextBlock Text="Total: " />
                        </StackPanel>
                        <StackPanel Grid.Column="1"
                                    Grid.Row="2">
                            <TextBox Name="txtTotalOrden"
                                     IsReadOnly="True" />
                        </StackPanel>
                    </Grid>
                </GroupBox>
                <GroupBox Header="Proveedor"
                          Margin="15">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="75" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="75" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <StackPanel Grid.Column="0"
                                    Grid.Row="0"
                                    HorizontalAlignment="Right">
                            <TextBlock Text="RUT:"
                                       Margin="0,5,0,0" />
                        </StackPanel>
                        <StackPanel Grid.Column="1"
                                    Grid.Row="0"
                                    Orientation="Horizontal"
                                    Margin="0,3">
                            <TextBox Width="120"
                                     MaxLength="12"
                                     Name="txtRutProveedor"
                                     Margin="5,0"
                                     HorizontalAlignment="Left"
                                     MaxHeight="30"
                                     MaxLines="1" />
                        </StackPanel>
                        <StackPanel Grid.Column="0"
                                    Grid.Row="1"
                                    HorizontalAlignment="Right">
                            <TextBlock Text="Nombre:"
                                       Margin="0,5,0,0" />
                        </StackPanel>
                        <StackPanel Grid.Column="1"
                                    Grid.Row="1"
                                    Orientation="Horizontal"
                                    Margin="0,3">
                            <TextBox Width="450"
                                     Name="txtNombreProveedor"
                                     Margin="5,0"
                                     HorizontalAlignment="Left"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <StackPanel Grid.Column="2"
                                    Grid.Row="1"
                                    HorizontalAlignment="Right">
                            <TextBlock Text="Giro:"
                                       Margin="0,5,0,0" />
                        </StackPanel>
                        <StackPanel Grid.Column="3"
                                    Grid.Row="1"
                                    Orientation="Horizontal"
                                    Margin="0,3"
                                    HorizontalAlignment="Left">
                            <TextBox Width="396"
                                     Name="txtGiroProveedor"
                                     Margin="5,0"
                                     HorizontalAlignment="Left"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <StackPanel Grid.Column="0"
                                    Grid.Row="3"
                                    HorizontalAlignment="Right">
                            <TextBlock Text="Direccion:"
                                       Margin="0,5,0,0" />
                        </StackPanel>
                        <StackPanel Grid.Column="1"
                                    Grid.Row="3"
                                    Orientation="Horizontal"
                                    Margin="0,3">
                            <TextBox Width="450"
                                     Name="txtDireccionProveedor"
                                     Margin="5,0"
                                     HorizontalAlignment="Left"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <StackPanel Grid.Column="0"
                                    Grid.Row="4"
                                    HorizontalAlignment="Right">
                            <TextBlock Text="Contacto:"
                                       Margin="0,5,0,0" />
                        </StackPanel>
                        <StackPanel Grid.Column="1"
                                    Grid.Row="4"
                                    Orientation="Horizontal"
                                    Margin="0,3">
                            <TextBox Width="450"
                                     Name="txtContactoProveedor"
                                     Margin="5,0"
                                     HorizontalAlignment="Left"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <StackPanel Grid.Column="2"
                                    Grid.Row="3"
                                    HorizontalAlignment="Right">
                            <TextBlock Text="Correo:"
                                       Margin="0,5,0,0" />
                        </StackPanel>
                        <StackPanel Grid.Column="3"
                                    Grid.Row="3"
                                    Orientation="Horizontal"
                                    Margin="0,3">
                            <TextBox Width="450"
                                     Name="txtCorreoProveedor"
                                     Margin="5,0"
                                     HorizontalAlignment="Left"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <StackPanel Grid.Column="2"
                                    Grid.Row="4"
                                    HorizontalAlignment="Right">
                            <TextBlock Text="Web:"
                                       Margin="0,5,0,0" />
                        </StackPanel>
                        <StackPanel Grid.Column="3"
                                    Grid.Row="4"
                                    Orientation="Horizontal"
                                    Margin="0,3">
                            <TextBox Width="450"
                                     Name="txtWebProveedor"
                                     Margin="5,0"
                                     HorizontalAlignment="Left"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <StackPanel Grid.Column="0"
                                    Grid.Row="5"
                                    HorizontalAlignment="Right">
                            <TextBlock Text="Telefono:"
                                       Margin="0,5,0,0" />
                        </StackPanel>
                        <StackPanel Grid.Column="1"
                                    Grid.Row="5"
                                    Orientation="Horizontal"
                                    Margin="0,3">
                            <TextBox Width="450"
                                     Name="txtTelefonoProveedor"
                                     Margin="5,0"
                                     HorizontalAlignment="Left"
                                     IsReadOnly="True" />
                        </StackPanel>
                        <StackPanel Grid.Column="2"
                                    Grid.Row="5"
                                    HorizontalAlignment="Right">
                            <TextBlock Text="Catalogo:"
                                       Margin="0,5,0,0" />
                        </StackPanel>
                        <StackPanel Grid.Column="3"
                                    Grid.Row="5"
                                    Orientation="Horizontal"
                                    Margin="0,3">
                            <TextBox Width="450"
                                     Name="txtCatalogoProveedor"
                                     Margin="5,0"
                                     HorizontalAlignment="Left"
                                     IsReadOnly="True" />
                        </StackPanel>
                    </Grid>
                </GroupBox>
                <GroupBox Header="Detalle productos"
                          Margin="15">
                    <DataGrid Name="GrillaDetalle"
                              Width="Auto"
                              Height="400"
                              ItemsSource="{Binding}" />
                </GroupBox>
            </StackPanel>
        </ScrollViewer>
    </extoolkit:BusyIndicator>
</Page>
